package com.homework.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@Data
public class StudentDto {
    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 10, message = "密码长度必须在6-10之间")
    private String password;

    @NotBlank(message = "班级信息不能为空")
    private String classInfo;
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
}
